Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update main #3314

Merged
merged 7 commits into from
Dec 20, 2024
Merged

chore: Update main #3314

merged 7 commits into from
Dec 20, 2024

Conversation

sfc-gh-asawicki
Copy link
Collaborator

Update main

sfc-gh-fbudzynski and others added 7 commits December 16, 2024 14:35
<!-- Feel free to delete comments as you fill this in -->

<!-- summary of changes -->
## Changes
- removed generation of integration_tests file
- added a print for the user to create the integration tests manually
- changed the `ShowByIdOperation` name to `ShowByIdOperationNoFiltering`
for no automatic generation of filtering options
- adjusted the template for ShowByID filtering
- removed `ShowByIDNoFiltering` option (replaced by
`ShowByIdOperationNoFiltering`)
- adjusted README of the SDK generator to the current state 

## References
<!-- issues documentation links, etc  -->
*
#3227
*
#3240
- Add external removal tests to functions and procedures (done during
old issues closing)
- Fix the following tests:
  - TestAcc_FunctionJava_InlineFull
  - TestAcc_FunctionPython_InlineBasic
  - TestAcc_FunctionPython_InlineFull
  - TestAcc_FunctionScala_InlineFull
  - TestAcc_FunctionSql_InlineBasic
Fix tests after V1:
- TestAcc_Functions
- TestAcc_Procedures
- TestAcc_ExternalFunction_complete
- TestAcc_GrantOwnership_OnObject_ProcedureWithArguments_ToAccountRole
-
TestAcc_GrantOwnership_OnObject_ProcedureWithoutArguments_ToDatabaseRole
- extended authenticator unit test
- Parameters tests were not altered but the environment was adjusted (to
verify if they will still fail)

Additionally:
- added 3 missing preview features (2 needed for tests and 1 just
missing for completion)
- generate marshal and `depends_on` for each resource and data source
model
- replace deprecated `FromModel` with the new one utilizing the
aforementioned marshaling
- fix test with explicit empty list (and add it to special variables)
- fix tests with explicit null value (and add it to special variables)
- generalize multiline handling and test it
- use multiline strings for definitions in functions and procedures
config builders
- simplify function and procedure definitions
- format whitespace in function and procedure definitions

For the next PRs (added to the issue):
- current config building for functions/procedures (especially
definitions) is complex:
  - definition is build using multiline golang strong and sprintf
  - whitespace is formatted
- this is added in the config builder wrapped in special multiline
marker
  - hcl-compatible json is generated
  - json converted to hcl
  - hcl formatted using custom formatters
This should be refined and made simpler (e.g. newline replacement,
encoding problems, etc.)

- marking in config builders generators which fields should be handled
as multiline by default (because now e.g. SQL function requires the
definition, so it's generated in basic builder as a string input, and
not the multiline one; because of that it has to be added again with
`WithFunctionDefinitionValue(...)` which is confusing)
<!-- Feel free to delete comments as you fill this in -->
- Add missing parameters based on the docs and output of SHOW PARAMETERS
IN ACCOUNT
- Add missing unit tests and implementations
- Add missing validations
- Relax validations for ints - just validate if they are non-negative
- Update docs
<!-- summary of changes -->

## Test Plan
<!-- detail ways in which this PR has been tested or needs to be tested
-->
* [ ] acceptance tests
<!-- add more below if you think they are relevant -->
* [ ] …

## References
<!-- issues documentation links, etc  -->
#3044 
#3116
#3245

## TODO
- Do not add missing user parameters - this will be done in
SNOW-1844996. Here, they are added only to account and session level
- More acceptance and integration tests should be done on a separate
account. This should be done during account resource follow-up
(SNOW-1866453)
- Update docs and migration guide
- Bump tracking version
- Fix method usage after merge (method has been removed)
- Fix whitespace
- Fix link
- Improve function and procedure examples (multiline)

References: #3303 #3302 #3298
@sfc-gh-asawicki sfc-gh-asawicki marked this pull request as ready for review December 20, 2024 14:17
Copy link

Integration tests cancelled for c82f453fc198b98a582c668ce0dbd4900cfc642a

Copy link

Integration tests cancelled for 655d0e54d48968bd5aa8217912d4114dfcbcadb6

@sfc-gh-asawicki sfc-gh-asawicki merged commit c98e449 into main Dec 20, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants